import Home from '~/view/home'
import CompanyHome from '~/view/companyHome'

const routers = [
    {
        path: '',
        redirect: '/recuitIndex'
    },
    {
        path: '/recuitIndex',
        redirect: '/recuitIndex/recuitIndex',
        name: 'recuitIndex',
        component: Home,
        children: [
            {
                path: '/recuitIndex/recuitIndex',
                redirect: '/recuitIndex/recuitIndex/index',
                component: () => import('~/view/recuitIndex/recuitIndex'),
                children: [
                    {
                        path: '/recuitIndex/recuitIndex/index',
                        component: () => import('~/view/recuitIndex/recuitIndex/index'),
                    }
                ]
            },
        ]
    },
    {
        path: '/login',
        redirect: '/login/login',
        name: 'loginIndex',
        component: Home,
        children: [
            {
                path: '/login/login',
                redirect: '/login/login/index',
                component: () => import('~/view/login/login'),
                children: [
                    {
                        path: '/login/login/index',
                        component: () => import('~/view/login/login/index'),
                    }
                ]
            },
        ]
    },
    {
        path: '/company',
        redirect: '/company/companyMain',
        component: Home,
        children: [
            {
                path: '/company/companyMain',
                redirect: '/company/companyMain/companyMain',
                component: () => import('~/view/company/company'),
                children: [
                    {
                        path: '/company/companyMain/companyMain',
                        name: 'companyMain',
                        component: () => import('~/view/company/companyMain/companyMain'),
                    },
                    {
                        path: '/company/companyMain/companyDetail',
                        name: 'companyDetail',
                        component: () => import('~/view/company/companyMain/companyDetail'),
                    }
                ]
            },
        ]
    },
    {
        path: '/position',
        redirect: '/position/positionMain',
        component: Home,
        children: [
            {
                path: '/position/positionMain',
                redirect: '/position/positionMain/positionMain',
                component: () => import('~/view/position/position'),
                children: [
                    {
                        path: '/position/positionMain/positionMain',
                        name: 'positionMain',
                        component: () => import('~/view/position/positionMain/positionMain'),
                    },
                    {
                        path: '/position/positionMain/positionDetail',
                        name: 'positionDetail',
                        component: () => import('~/view/position/positionMain/positionDetail'),
                    }
                ]
            },
        ]
    },
    {
        path: '/jobList',
        redirect: '/jobList/jobList',
        name: 'jobList',
        component: Home,
        children: [
            {
                path: '/jobList/jobList',
                redirect: '/jobList/jobList/application',
                component: () => import('~/view/jobList/jobList'),
                children: [
                    {
                        path: '/jobList/jobList/application',
                        name: 'application',
                        component: () => import('~/view/jobList/jobList/application'),
                    },
                    {
                        path: '/jobList/jobList/collection',
                        name: 'collection',
                        component: () => import('~/view/jobList/jobList/collection'),
                    }
                ]
            },
        ]
    },
    {//提示页，包括成功提示、失败提示
        path: '/toast',
        redirect: '/toast/toast',
        component: Home,
        children: [
            {
                path: '/toast/toast',
                redirect: '/toast/toast/toast',
                component: () => import('~/view/toast/toast'),
                children: [
                    {
                        path: '/toast/toast/toast',
                        name: 'toast',
                        component: () => import('~/view/toast/toast/toast'),
                    }
                ]
            },
        ]
    },
    {
        path: '/myResume',
        redirect: '/myResume/resume',
        name: 'resumeState',
        component: Home,
        children: [
            {
                path: '/myResume/resume',
                redirect: '/myResume/resume/resumeState',
                component: () => import('~/view/myResume/myResume'),
                children: [
                    {
                        path: '/myResume/resume/resumeState',
                        component: () => import('~/view/myResume/resume/resumeState'),
                    }
                ]
            },
        ]
    },
    {
        path: '/publicJob',
        redirect: '/publicJob/publicJob',
        component: CompanyHome,
        children: [
            {
                path: '/publicJob/publicJob',
                redirect: '/publicJob/publicJob/index',
                component: () => import('~/view/publicJob/publicJob'),
                children: [
                    {
                        path: '/publicJob/publicJob/index',
                        name: 'publicJob',
                        component: () => import('~/view/publicJob/publicJob/index'),
                    }
                ]
            },
        ]
    },
    {
        path: '/myCompany',
        redirect: '/myCompany/companyInfo',
        component: CompanyHome,
        children: [
            {
                path: '/myCompany/companyInfo',
                redirect: '/myCompany/companyInfo/companyInfo',
                component: () => import('~/view/myCompany/myCompany'),
                children: [
                    {
                        path: '/myCompany/companyInfo/companyInfo',
                        name: 'companyInfo',
                        component: () => import('~/view/myCompany/companyInfo/companyInfo'),
                    }
                ]
            },
            {
                path: '/myCompany/editCompany',
                redirect: '/myCompany/editCompany/editCompany',
                component: () => import('~/view/myCompany/myCompany'),
                children: [
                    {
                        path: '/myCompany/editCompany/editCompany',
                        name: 'editCompany',
                        component: () => import('~/view/myCompany/editCompany/editCompany'),
                    }
                ]
            },
        ]
    },
    {
        path: '/myCompany/createCompany',
        redirect: '/myCompany/createCompany',
        component: Home,
        children: [
            {
                path: '/myCompany/createCompany',
                redirect: '/myCompany/createCompany/createCompany',
                component: () => import('~/view/myCompany/myCompany'),
                children: [
                    {
                        path: '/myCompany/createCompany/createCompany',
                        name: 'createCompany',
                        component: () => import('~/view/myCompany/createCompany/createCompany'),
                    }
                ]
            },
        ]
    },
    {
        path: '/resumeMsg',
        redirect: '/resumeMsg/resumePool',
        component: CompanyHome,
        children: [
            {
                path: '/resumeMsg/resumePool',
                redirect: '/resumeMsg/resumePool/resumePool',
                name: 'resumePool',
                component: () => import('~/view/resumeMsg/resumeMsg'),
                children: [
                    {
                        path: '/resumeMsg/resumePool/resumePool',
                        component: () => import('~/view/resumeMsg/resumePool/resumePool'),
                    }
                ]
            },
            {
                path: '/resumeMsg/resumeMsg',
                redirect: '/resumeMsg/resumeMsg/index',
                component: () => import('~/view/resumeMsg/resumeMsg'),
                children: [
                    {
                        path: '/resumeMsg/resumeMsg/index',
                        name: 'resumeMsgIndex',
                        component: () => import('~/view/resumeMsg/resumeMsg/index'),
                    }
                ]
            },
            {
                path: '/resumeMsg/resumeDetail',
                redirect: '/resumeMsg/resumeDetail/resumeDetail',
                component: () => import('~/view/resumeMsg/resumeMsg'),
                children: [
                    {
                        path: '/resumeMsg/resumeDetail/resumeDetail',
                        name: 'resumeDetail',
                        component: () => import('~/view/resumeMsg/resumeDetail/resumeDetail'),
                    }
                ]
            },
        ]
    },
    {
        path: '/equity',
        redirect: '/equity/equityMain',
        name: 'equityMain',
        component: CompanyHome,
        children: [
            {
                path: '/equity/equityMain',
                redirect: '/equity/equityMain/equityMain',
                component: () => import('~/view/equity/equity'),
                children: [
                    {
                        path: '/equity/equityMain/equityMain',
                        component: () => import('~/view/equity/equityMain/equityMain'),
                    }
                ]
            },
        ]
    },
]

export default routers